<template>
<div>
    <div class="catsitem">
     <div> <input type="checkbox" class="check" @click='btnClick' :checked='item.chekbox'></div>
      <div class="imgchoose">
      <div><img :src='item.img'/></div>
      </div>  
      <div class="info">
      <div class="delete"><span class="title">{{item.title}}</span></div> 
      <div class="delete"><span class="desc">{{item.desc}}</span></div>
      <div class="delete1"><span class="price">￥{{item.lowNowPrice}}</span>
      <span class="count">×{{item.count}}</span>
       </div>
      </div> 
    </div>
   
</div>
  
</template>

<script>
export default {
  name:'catslistitem',
  props: {
    item:{
      type:Object,
      defualt(){
        return {}
      }
    }
  },
  methods: {
    btnClick(){
      this.item.chekbox=!this.item.chekbox
    }
  }
}
</script>

<style scoped>
  .catsitem img{
    width: 80px;
    border-radius: 10px;
    vertical-align: middle;
  }
  .catsitem{  
    padding: 10px 10px 0 5px;
    display: flex;
    align-items: center;
    /* border: 1px solid rgb(192,192,192); */
    border-bottom: 1px solid rgb(192,192,192)
  }
  .delete{
  padding: 10px 0;
  overflow: hidden;
  width: 255px;
  white-space: nowrap; 
  text-overflow: ellipsis;
  }
  .info{
    margin-left: 5px;
  }
  .delete span{
    font-size: 18px;
    font-weight: bold;
  }
  .price{
    color: var(--color-text);
    font-size: 22px;
  }
  .check{
		width: 30px;
		height: 30px;
		overflow: hidden; 
		 border-radius: 100%;
		border: 1px solid black;
    		/* normal		 */
  }
  .check:checked {
			background: url(~assets/img/detail/check_active.png) no-repeat center;
			background-size: cover;}
  .count{
    font-size: 18px;
    color: black;
    font-weight: bold;
  }
</style>